venue: restore the dropped empty-receipt guard on status and cancel - #590
Merged
Conversation
The videre rename dropped the empty-receipt rejection on the status and cancel paths, so any receipt including empty succeeded unconditionally. Restore the guard at the receipt seam: the venue export shim rejects an empty receipt before adapter dispatch and VenueClient::status/cancel reject it before the wire, both through a shared guard_receipt helper. The original check used a dedicated invalid-receipt variant; that would extend the frozen videre:types@0.1.0 venue-error, so the guard reuses the existing invalid-body case with an empty-receipt message. A unit test and a before-the-transport client test restore the dropped coverage.
mfw78
added a commit
that referenced
this pull request
Jul 25, 2026
…mismatch (#597) The venue-error WIT variant gains two additive, venue-neutral cases for the representable adapter-detected conditions that #589 and #590 had shoved into invalid-body strings: invalid-receipt for an empty or structurally-invalid receipt, and receipt-mismatch for a venue-returned identifier that disagrees with the locally derived one. Both are threaded through the bindgen VenueError, the owned VenueFault mirror and the faults.rs conversions, and the two adapter call sites move off invalid-body onto them so a caller can branch without parsing a message. invalid-body and denied stay as the escape hatch for custom or unrepresentable errors. The change is a purely additive edit to videre:types with no version bump, kept extensible per the pre-cleave freeze policy, so it lands cheaply in the monorepo before the carve. Closes #591
mfw78
added a commit
that referenced
this pull request
Jul 27, 2026
…mismatch (#597) The venue-error WIT variant gains two additive, venue-neutral cases for the representable adapter-detected conditions that #589 and #590 had shoved into invalid-body strings: invalid-receipt for an empty or structurally-invalid receipt, and receipt-mismatch for a venue-returned identifier that disagrees with the locally derived one. Both are threaded through the bindgen VenueError, the owned VenueFault mirror and the faults.rs conversions, and the two adapter call sites move off invalid-body onto them so a caller can branch without parsing a message. invalid-body and denied stay as the escape hatch for custom or unrepresentable errors. The change is a purely additive edit to videre:types with no version bump, kept extensible per the pre-cleave freeze policy, so it lands cheaply in the monorepo before the carve. Closes #591
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Restore the empty-receipt rejection on the venue
statusandcancelpaths. Aguard_receipthelper rejects an empty receipt asinvalid-bodybefore it reaches the export shim, and theClient::status/Client::cancelpath rejects it before the transport. Both the adapter export glue and the client wrapper are covered by tests.Why
The videre rename dropped the guard:
status/cancelpreviously rejected an empty receipt with a dedicatedVenueError::InvalidReceipt, anddisowned_receipt_is_dropped_from_the_watchcovered it, but the variant and the test were removed rather than adapted. Both paths then succeeded unconditionally on any receipt, including empty ones, so a disowned or never-issued receipt would be watched or cancelled silently instead of rejected.Testing
Full battery on the pinned 1.94 toolchain, all green:
nix develop --command just ci(fmt, clippy-D warnings, doc, module wasms,cargo test --workspace --all-features)nix develop --command just check-venue-agnosticnix develop --command just check-cow-orderbook-onlyAI Assistance
Implemented with Claude Code.
Note for review
The original guard used a dedicated
VenueError::InvalidReceipt.VenueErroris the bindgen mirror of thevenue-errorvariant inwit/videre-types/types.wit@0.1.0, which is frozen and fans across repos, so restoring the dedicated variant is a value-flow-freeze decision (gated by nullislabs/videre-nexum-module#22). This car therefore reuses the existinginvalid-bodyvariant and touches no file underwit/. If a dedicatedinvalid-receiptvariant is wanted, that is a separate WIT-freeze change. The issue also offered documenting the drop as intentional as an alternative resolution.Closes #491